package cn.dm.server.user_login;

import com.dm.vo.DmUserVO;

import java.util.List;

public interface LoginDmUser {
    /**
     * 根据号码和密码查询用户
     * @param phone
     * @param password
     * @return
     * @throws Exception
     */
    public DmUserVO queryUser_PhoneAndPassword(String phone, String password)throws Exception;

    /**
     * 合并用户和token
     * @param dmUserVO
     * @param tokenKey
     * @return
     * @throws Exception
     */
    public List<Object> mergeByUser_Token(String tokenKey, DmUserVO dmUserVO)throws Exception;
/*


    public String createWxUserToken(String userInfoJsonstr)throws Exception;
*/

    /**
     * 验证邮箱格式
     *
     * @param email
     * @return
     */
    public boolean validEmail(String email)throws Exception;

    /**
     * 验证手机号格式
     *
     * @param phon
     * @return
     */

    public boolean validPhon(String phon)throws Exception;

    /**
     * 发送手机验证码等
     *
     * @param phone
     * @throws Exception
     */

    public String sendPhon(String prifix,String phone) throws Exception;

    /**
     * 发送邮箱验证码等
     *
     * @param phone
     * @throws Exception
     */

    public String sendMail(String prifix,String phone) throws Exception;

    /**
     * 添加注册用户
     * @param phone
     * @param password
     */
    public void addRegisterUser(String phone,String password)throws Exception;
}
